import React from 'react';
import ReactDOM from 'react-dom';
import './index.less';
import RouterPages from './router';
import * as serviceWorker from './serviceWorker';
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import { Provider } from 'react-redux';
import reducer from '@/store';
import './i18n';
import 'core-js/es';
import 'react-app-polyfill/ie9';
import 'react-app-polyfill/stable';
const store = createStore(reducer, compose(applyMiddleware(thunk)));
if (true) {
    require('@/mock/index.js'); //不需要mock 直接注释掉
}
ReactDOM.render(
    <Provider store={store}>
        <RouterPages />
    </Provider>,
    document.getElementById('root')
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
